package com.example.demoreptile;

import lombok.extern.slf4j.Slf4j;
import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;

/**
 * @version 1.0.0
 * @className: TestWeather
 * @description:
 * @author: zhangjunfa
 * @date: 2023/7/17 16:43
 */
@Slf4j
public class TestArticle {
    private static String url = "https://www.ibiquges.com/7/7004/";
    public static void main(String[] args) throws Exception {
        url = URLDecoder.decode(url, "UTF-8");

        //模拟浏览器访问，防止阻止跳到登录页面
        Connection mozilla = Jsoup.connect(url).userAgent("Mozilla");
        Document document = mozilla.get();

        Element element = document.body();
        Element list = element.getElementById("list");

        log.info("结果：{}");

    }
}
